#ifndef DOUBAN_MINIBLOG_MINIBLOGLAYOUT_H
#define DOUBAN_MINIBLOG_MINIBLOGLAYOUT_H

#include <QObject>
#include <QList>
namespace Douban
{
	class MiniBlogEntryWidget;
	class MiniBlogLayout : public QObject
	{
		Q_OBJECT
		public:
			MiniBlogLayout(QWidget* m):
				m_mainWidget(m),
				i_dirtyIndex(-1){}

			void prependWidget(MiniBlogEntryWidget*);
			void removeWidget(MiniBlogEntryWidget*);

			void updateLayout();
			void widthChanged(int newWidth);
		public slots:
			void updateLayout(MiniBlogEntryWidget*);
		private:
			QWidget*	m_mainWidget;
			int			i_dirtyIndex;
			QList<MiniBlogEntryWidget*> m_widgetList;
	};
}
#endif // MINIBLOGLAYOUT_H
